#ifndef CVECTOR3D_H_
#define CVECTOR3D_H_

#include "cvectorbase.h"
#include "../exception/cinvalidsizeexception.h"

/**
 * CVector3D - class representing 3-dimensional vector
 * @author Michal Rost
 * @date 23.07.2007
 */
template <typename T>
class CVector3D : public CVectorBase<T> {
public:
  CVector3D();
  CVector3D(T x, T y, T z);
  CVector3D(const CVector3D<T> &v);
  CVector3D(const CVectorBase<T> &v);
  ~CVector3D();
  CVector3D<T>& operator = (const CVector3D<T> &v);
  CVector3D<T> operator + (const CVector3D<T> &v) const;
  CVector3D<T> operator - (const CVector3D<T> &v) const;
  CVector3D<T> operator * (T num) const;
  CVector3D<T> operator / (T num) const;
  TIndex getSize() const;
  T getX() const;
  T getY() const;
  T getZ() const;
  void setX(T x);
  void setY(T y);
  void setZ(T z);
  static CVector3D<T> cross(const CVector3D<T> &v1, const CVector3D<T> &v2);
  static string getClassName() {
    return "CVector3D";
  }
protected:
  void setSize(TIndex size);
};

#endif
